#!/usr/bin/env python
# -*- coding: utf-8 -*-

"""
 Jexjex
 'Hello world' controller example

 Copyright Jan-Karel Visser - all rights are reserved
 Licensed under the LGPLv3 (http://www.gnu.org/licenses/lgpl.html)

 This program is distributed in the hope that it will be useful, but
 WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 The logic for controllers is simple, class names are called with
 classname.title() and _run() is executed by jexjex.load_class

    class My_Classname:
        def __init__(self, jexjex):
            self.app = jexjex
        def run(self):
            return 'hallo wereld'

"""


class Hello_World:

    def __init__(self, jexjex):
        """
        Extending our instance with Jexjex's class attributes

        """
        self.app = jexjex

    def _run(self):
        """
        run is basicly the router, so let's do some simple stuff here

        """

        return self.app.view('hello.html')
